<script setup lang="ts"></script>
<template>
<div class="test maxw-1200 m-auto">
    按钮：
    <p>{{name}}</p>
    <p>{{count}}</p>
    <!-- <p>{{countdownRef.name}}</p> -->
    <a-button type="primary" @click="getCode">{{count}}</a-button>
</div>
</template>

<script lang="ts">
import { defineComponent, reactive, toRaw ,ref} from 'vue';
import { Form } from 'ant-design-vue';

export default defineComponent({
    setup(){
        const codeTxt = ref<string>('获取验证码');
        const name = ref<string>('李斯');
        let count = ref<number>(60);
        const getCode =()=>{
            console.log('获取验证码')
            count.value++
            // this.modelRef.codeTxt='倒计时('+this.modelRef.count+')'
        }
        return {
            codeTxt,
            count,
            getCode,
            name
        };
    },
});
</script>

<style lang="less" scoped>
.test {
    border: 1px solid #f00;
    min-height: 80vh;
}
</style>
